package com.ymatou.iapi.productmanager.service;

import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;

public class AttachProductToLivesCall extends YmatouAutoTestCall{
	private static String opurl ="/api/LivePublish/AttachProductToLives";
	
	public AttachProductToLivesCall() {
		super(EnvSetup.getSystemUrl("productmanager"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	
	public JSONObject call(int sellerId,String productId,List<Integer> liveIdsList){
		return this.callAndGetReturnData(MapUtil.hashMap("SellerId", sellerId,"ProductId",productId,
													"LiveIdList",new JSONArray(liveIdsList)));
	}
	
	
	
	public static void main(String args[]){
		new AttachProductToLivesCall().callAndGetReturnData();
	}
}